package com.hgw.Demo02CommandPattern.examples;

/**
 * Data time:2021/12/16 19:28
 * StudentID:2019112118
 * Author:hgw
 * Description: 帮助命令类，充当具体命令类
 */
public class HelpCommand extends Command{
    private DisplayHelpClass hcObj;     // 维持对请求接收者的引用

    public HelpCommand() {
        hcObj = new DisplayHelpClass();
    }

    // 命令执行方法，将调用请求接收者的业务方法
    @Override
    public void execute() {
        hcObj.display();
    }
}
